<template>
  <div class="mainbox">
    <div class="m-title main-container">
      <div class="title-box">
        <!-- <div>会议日程</div> -->
        <img src="@/assets/images/xwzx@3x.png" alt=""/>
      </div>
      <div class="main-container content-box">
        <!-- 列表 -->
        <div class="c-box">
          <div class="news-item-box">
            <div class="news-item" v-for="(item,index) in newsList" :key="index">
              <div class="news-item-pic">
                <img src="@/assets/images/tu@3x.png" alt=""/>
              </div>
              <div class="news-item-right">
                <div class="news-item-title">{{item.title}}</div>
                <div class="news-item-abstract">
                  {{item.abstract}}
                </div>
                <div class="detail">查看详情</div>
              </div>
            </div>
          </div>
          <Pagination :total="1000" ></Pagination>

        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Pagination from "@/components/Pagination/index.vue";

export default {
  name: "NewsCenter",
  components: {Pagination},
  data() {
    return {
      newsList: [
        {img: "@/assets/images/tu@3x.png", title: "2021智能经济高峰论坛", abstract: "解读我国智能经济相关政策，探讨智能经济发展路径。与政务、制造、金融、能源等行业号作伙伴一起，分享产业智能化行业实践"},
        {img: "@/assets/images/tu@3x.png", title: "全国机械职业教育教学指导委员会自动化类专业委员会(中职)2019年工作...", abstract: "部分技术会议前置举办"},
        {img: "@/assets/images/tu@3x.png", title: "郑丽梅副主任出席全国机械行业企业人才认证与就业服务联盟成立大会", abstract: "解读我国智能经济相关政策，探讨智能经济发展路径。与政务、制造、金融、能源等行业号作伙伴一起，分享产业智能化行业实践"},
        {img: "@/assets/images/tu@3x.png", title: "职业教育装备制造类国家规划教材建设高级研修班顺利开班", abstract: "解读我国智能经济相关政策，探讨智能经济发展路径。与政务、制造、金融、能源等行业号作伙伴一起，分享产业智能化行业实践"},
        {img: "@/assets/images/tu@3x.png", title: "第五届全国智能制造应用技术技能大赛决赛安徽六安赛区开幕", abstract: "解读我国智能经济相关政策，探讨智能经济发展路径。与政务、制造、金融、能源等行业号作伙伴一起，分享产业智能化行业实践"},
        {img: "@/assets/images/tu@3x.png", title: "2021智能经济高峰论坛", abstract: "解读我国智能经济相关政策，探讨智能经济发展路径。与政务、制造、金融、能源等行业号作伙伴一起，分享产业智能化行业实践"},
      ]
    }
  },

};
</script>

<style scoped lang="scss">

.mainbox {
  flex: 1;
  padding-top: 34px;
  padding-bottom: 81px;

}

.m-title {
  margin-bottom: 34px;
}

.layui-main {
  position: relative;
  /* width: 1160px; */
  margin: 0 auto;
}

.title-box {
  margin-top: 32px;
  margin-bottom: 41px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.title-box img {
  width: 323px;
  height: 86px;
}

.title-box div:nth-child(1) {
  font-size: 40px;
  font-weight: 800;
  color: #243042;
  margin: 17px 0;
}

/*
.title-box::after {
  display: block;
  content: "";
  width: 60px;
  height: 2px;
  background: #0c2c84;
  border-radius: 1px;
} */
.content-box {
  /* min-height: 600px; */
  box-shadow: 0 0 30px 0 rgba(15, 59, 130, 0.12);
  border-radius: 20px;
  border-width: 0;
  border-style: solid;
  background-color: #fff;
  border-color: #eee;
  color: #5f5f5f;
  font-size: 20px;
  /* height: 575px; */
}


.c-box {
  display: flex;
  flex-direction: column;
  padding: 22px 48px;
  //background-color: #014ac7;
}

.news-item {
  display: flex;
  padding: 30px 0;
  border-bottom: 1px solid #D9D9D9;
}
.news-item:last-child {
  border-bottom: none;
}
.news-item-pic img {
  width: 300px;
  height: 180px;
  border-radius: 8px;
}

.news-item-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 180px;
  padding-left:24px;
}

.news-item-title {
  color: #333333;
  font-size: 24px;
  line-height: normal;
  /* 设置最大高度 */
  max-height: 72px; /* 36px * 2行 = 72px */
  /* 确保溢出部分隐藏 */
  overflow: hidden;
  /* 超出部分显示省略号 */
  text-overflow: ellipsis;
  /* 限制文本只在容器高度超出时才显示省略号 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1; /* 显示的行数 */

}

.news-item-abstract {
  margin-top: 24px;
  color: #333333;
  font-family: "AlibabaPuHuiTi-Regular", serif;
  font-size: 20px;
  text-align: justify;
  line-height: 36px;
  /* 设置最大高度 */
  max-height: 72px; /* 36px * 2行 = 72px */
  /* 确保溢出部分隐藏 */
  overflow: hidden;
  /* 超出部分显示省略号 */
  text-overflow: ellipsis;
  /* 限制文本只在容器高度超出时才显示省略号 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* 显示的行数 */

}

.detail {
  color: #014AC7;
  font-family: "AlibabaPuHuiTi-Regular", serif;
  margin-top: 30px;
}

</style>